package com.itheima.wisdomnext.entity;

import com.fasterxml.jackson.annotation.JsonInclude;
import java.sql.Timestamp;
import java.util.List;

public class Follow {
    private Integer id;               // 关注记录 ID
    @JsonInclude(JsonInclude.Include.NON_NULL) // 仅在 followerId 不为 null 时返回
    private Integer followerId;       // 关注者 ID
    private Integer followedId;       // 被关注者 ID
    @JsonInclude(JsonInclude.Include.NON_NULL) // 仅在 users 不为 null 时返回
    private List<Users> users; // 发布人信息列表
    private Timestamp createdAt;      // 关注时间

    @JsonInclude(JsonInclude.Include.NON_NULL) // 仅在 isFollowing 不为 null 时返回
    private Boolean isFollowing;      // 是否互相关注

    // Getters and Setters

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getFollowerId() {
        return followerId;
    }

    public void setFollowerId(Integer followerId) {
        this.followerId = followerId;
    }

    public Integer getFollowedId() {
        return followedId;
    }

    public void setFollowedId(Integer followedId) {
        this.followedId = followedId;
    }

    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    public Boolean getIsFollowing() {
        return isFollowing;
    }

    public void setIsFollowing(Boolean isFollowing) {
        this.isFollowing = isFollowing;
    }

    public List<Users> getUsers() {
        return users;
    }

    public void setUsers(List<Users> users) {
        this.users = users;
    }
}
